package com.lsh.domain;


import com.lsh.domain.validation.group.MailGroup;
import com.lsh.domain.validation.group.PhoneGroup;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 注册信息封装类
 * @author Administrator
 * @date 2019/11/08 12:22
 */
public class Register implements Serializable {

    private int id; //用户id
    @NotBlank(message = "{register.email.not.blank}", groups = MailGroup.class)
    @Email(message = "{register.email.not.pattern}", groups = MailGroup.class)
    private String email; //用户邮箱
    @NotBlank(message = "{register.phone.not.blank}", groups = PhoneGroup.class)
    private String phone; //用户手机号码
    private String code; //验证码
    @NotBlank(message = "{register.password.not.blank}", groups = {MailGroup.class, PhoneGroup.class})
    @Size(min = 6, message = "{register.password.size}", groups = {MailGroup.class, PhoneGroup.class})
    private String password; //用户密码
    @NotBlank(message = "{register.username.not.blank}", groups = {MailGroup.class, PhoneGroup.class})
//    @Size(min = 8, max = 16, message = "{register.username.size}")
    private String username; //用户账号
    @NotBlank(message = "{register.nickname.not.blank}", groups = {MailGroup.class, PhoneGroup.class})
    private String nickname; //用户昵称
    @NotNull(message = "{register.gender.not.null}", groups = {MailGroup.class, PhoneGroup.class})
    private int gender; //用户性别
    @NotBlank(message = "{register.birthday.not.blank}", groups = {MailGroup.class, PhoneGroup.class})
    private String birthday; //用户出生日期
    @NotBlank(message = "{register.job.not.blank}", groups = {MailGroup.class, PhoneGroup.class})
    private String job; //用户职务

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

}
